<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>SetMeshData</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">SetMeshData()</font></b></p>
<p><b>语法</b></p><blockquote>

Result = <font color="#3A3966"><b>SetMeshData</b></font>(#Mesh, SubMesh, DataArray(), Flags, FirstIndex, LastIndex)</blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Set internal mesh data, like vertices, face etc. 

 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Mesh</i></td>
<td width="90%"> 
 
The mesh to use. 

 

</td></tr>
<tr><td><i>SubMesh</i></td>
<td> 
 
The submesh to set the data to. The first submesh index is 0 (main mesh). 

 

</td></tr>
<tr><td><i>DataArray()</i></td>
<td> 
 
The array containing the data to set. It has to be an array of type "PB_MeshVertex" or "PB_MeshFace" 
depending of the specified flags. 

 

</td></tr>
<tr><td><i>Flags</i></td>
<td> 
Specifies which kind of data needs to be set. 它可以是下列值之一︰ 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Mesh_Vertex</font>: DataArray() is an array of type "PB_MeshVertex".
  <font color="#924B72">#PB_Mesh_Face</font>  : DataArray() is an array of type "PB_MeshFace".
</font></pre>

combined with: 
 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Mesh_UVCoordinate</font> : Set the UV coordinate information (only for <font color="#924B72">#PB_Mesh_Vertex</font> flag)
  <font color="#924B72">#PB_Mesh_Normal</font>       : Set the normal information (only for <font color="#924B72">#PB_Mesh_Vertex</font> flag)
  <font color="#924B72">#PB_Mesh_Color</font>        : Set the color information (only for <font color="#924B72">#PB_Mesh_Vertex</font> flag)
</font></pre>



The "PB_MeshVertex" and "PB_MeshFace" structures are defined like this: 
 
<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">Structure</font></b> PB_MeshVertex
    x.f
    y.f
    z.f
    NormalX.f ; only used if <font color="#924B72">#PB_Mesh_Normal</font> flag is set
    NormalY.f ;
    NormalZ.f ;
    TangentX.f
    TangentY.f
    TangentZ.f
    u.f       ; only used if <font color="#924B72">#PB_Mesh_UVCoordinate</font> flag is set
    v.f       ;
    Color.l   ; only used if <font color="#924B72">#PB_Mesh_Color</font> flag is set
  <b><font color="#3A3966">EndStructure</font></b>
  
  <b><font color="#3A3966">Structure</font></b> PB_MeshFace
    Index.l
  <b><font color="#3A3966">EndStructure</font></b>   
</font></pre>

</td></tr>
<tr><td><i>FirstIndex, LastIndex</i></td>
<td> 
 
First and last index to set the data to. 

 

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>



Returns nonzero on success and zero on failure. 

 

</blockquote><p><b>参阅</b></p><blockquote>

<a href="getmeshdata.html">GetMeshData()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=savemesh.html>SaveMesh()</a> - <a href="index.html">Mesh Index</a> - <a href="setmeshmaterial.html">SetMeshMaterial()</a> -&gt;<br><br>

</body></html>